#include <iostream>
#include <string>
using namespace std;

class Time {
public:
    Time()
    {
        hour = 0;
        minute = 0;
        second = 0;
    }
    Time(int h, int m, int s)
    {
        hour = h;
        minute = m;
        second = s;
    }
    void set_time();
    void show_time();
private:
    int hour;
    int minute;
    int second;
};

class Box {
public:
    //Box();
    Box(int len = 10, int width = 10, int high = 10);
    void show_volume();
private:
    int len;
    int width;
    int high;
};

class Student {
public:
    Student(int age, char sex, string name);
    ~Student();
    void show_msg();
private:
    int age;
    char sex;
    string name;
};

class Box1 {
public:
    Box1();
    Box1(int length, int width, int high);
    void show_volume();
private:
    int length;
    int width;
    int high;
};

class Box2 {
public:
    Box2();
    Box2(int len, int width);
    void show_volume();
private:
    int length;
    int width;
    static int high;
};

class Student1 {
public:
    Student1(int number, int age, int score);
    void comp_sum();
    static float get_average();
private:
    static int sum;
    static float count;
    int number;
    int age;
    int score;
};

class Time1 {
public:
    Time1();
    Time1(int hour, int minute, int second);
    friend void display(Time1& time);
private:
    int hour;
    int minute;
    int second;
};

class Date; // 前置声明
class Time2 {
public:
    Time2(int hour, int minute, int second);
    void show_time(Date&);
private:
    int hour;
    int minute;
    int second;
};

class Date {
public:
    Date(int year, int month, int day);
    friend void Time2::show_time(Date&);
private:
    int year;
    int month;
    int day;
};

template<class numtype>
class Compare {
public:
    Compare(numtype n1, numtype n2)
    {
        num1 = n1;
        num2 = n2;
    }
    numtype max()
    {
        return (num1 > num2) ? num1 : num2;
    }
    numtype min()
    {
        return (num1 < num2) ? num1 : num2;
    }
private:
    numtype num1;
    numtype num2;
};